Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Show resource group in global and local current_queries #50763

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

ZiheLiu
Copy link
Contributor

@ZiheLiu ZiheLiu commented Sep 5, 2024

Why I'm doing:

Show ResourceGroupName in show proc "/current_queries" and show proc "/global_current_queries".

show proc "/global_current_queries" \G
***************************[ 1. row ]***************************
StartTime     | 2024-09-05 19:34:16
feIp          | 127.0.0.1
QueryId       | c8942a3e-6b7a-11ef-b949-00163e02ada5
ConnectionId  | 0
Database      | d1
User          | root
ScanBytes     | 0.000 B
ScanRows      | 0 rows
MemoryUsage   | 184.188 KB
DiskSpillSize | 0.000 B
CPUTime       | 0.000 s
ExecTime      | 200.540 s
Warehouse     | default_warehouse
CustomQueryId |
ResourceGroup | default_wg

show proc "/global_current_queries" has some problems, when the query is forwarded to leader:

  1. feIP displays leader FE IP.
  2. ConnectionID is always 0.

TODO

  • We need fix these issues
  • and add a information_schema.current_queries.

What I'm doing:

Relates to #49965.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

@ZiheLiu ZiheLiu requested a review from a team as a code owner September 5, 2024 11:38
@wanpengfei-git wanpengfei-git requested a review from a team September 5, 2024 11:38
@mergify mergify bot assigned ZiheLiu Sep 5, 2024
silverbullet233
silverbullet233 previously approved these changes Sep 5, 2024
murphyatwork
murphyatwork previously approved these changes Sep 5, 2024
Signed-off-by: zihe.liu <[email protected]>
Signed-off-by: zihe.liu <[email protected]>
Signed-off-by: zihe.liu <[email protected]>
Copy link

sonarcloud bot commented Sep 6, 2024

ZiheLiu added a commit that referenced this pull request Sep 7, 2024
Copy link

github-actions bot commented Sep 9, 2024

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

github-actions bot commented Sep 9, 2024

[FE Incremental Coverage Report]

pass : 29 / 30 (96.67%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/qe/scheduler/FeExecuteCoordinator.java 0 1 00.00% [308]
🔵 com/starrocks/qe/QeProcessorImpl.java 3 3 100.00% []
🔵 com/starrocks/qe/QueryStatisticsInfo.java 15 15 100.00% []
🔵 com/starrocks/catalog/ResourceGroupMgr.java 4 4 100.00% []
🔵 com/starrocks/qe/DefaultCoordinator.java 2 2 100.00% []
🔵 com/starrocks/qe/QueryStatisticsItem.java 4 4 100.00% []
🔵 com/starrocks/common/proc/CurrentQueryStatisticsProcDir.java 1 1 100.00% []

Copy link

github-actions bot commented Sep 9, 2024

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@kangkaisen kangkaisen merged commit 8855b13 into StarRocks:main Sep 9, 2024
48 of 50 checks passed
HangyuanLiu pushed a commit to HangyuanLiu/starrocks that referenced this pull request Sep 12, 2024
renzhimin7 pushed a commit to renzhimin7/starrocks that referenced this pull request Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants